import request from '@/utils/request'

// 查询课程视频列表
export function listCourse(query) {
  return request({
    url: '/curriculum/course/list',
    method: 'get',
    params: query
  })
}

// 查询课程视频详细
export function getCourse(id) {
  return request({
    url: '/curriculum/course/' + id,
    method: 'get'
  })
}

// 新增课程视频
export function addCourse(data) {
  return request({
    url: '/curriculum/course',
    method: 'post',
    data: data
  })
}

// 修改课程视频
export function updateCourse(data) {
  return request({
    url: '/curriculum/course',
    method: 'put',
    data: data
  })
}

// 删除课程视频
export function delCourse(id) {
  return request({
    url: '/curriculum/course/' + id,
    method: 'delete'
  })
}

// 删除课程视频
export function listTeacher() {
  return request({
    url: '/curriculum/course/listTeacher',
    method: 'post'
  })
}

// 删除课程视频
export function listTag() {
  return request({
    url: '/curriculum/course/listTag/',
    method: 'post'
  })
}

// 删除课程视频
export function listType() {
  return request({
    url: '/curriculum/course/listType/',
    method: 'post'
  })
}

//修改课程视频推荐状态
export function changeStatus(id,status) {
  const data={
    id,
    status
  }
  return request({
    url: '/curriculum/course/changeStatus/',
    method: 'post',
    data:data
  })
}

//修改课程视频推荐状态
export function changeIsShow(id,isSlideShow) {
  const data={
    id,
    isSlideShow
  }
  return request({
    url: '/curriculum/course/changeIsShow/',
    method: 'post',
    data:data
  })
}



